//
//  JCTempViewController.swift
//  SinaWeibo_18
//
//  Created by mac on 15/10/11.
//  Copyright © 2015年 cz. All rights reserved.
//

import UIKit

class JCTempViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        title = "当前是第\(navigationController!.childViewControllers.count)层"
        view.backgroundColor = UIColor.whiteColor()
//        navigationItem.leftBarButtonItem = UIBarButtonItem.item("navigationbar_back_withtext", title: "首页", target: self, action: "back")
        
    }
    @objc private func back(){
        //回退
        navigationController?.popViewControllerAnimated(true)
    }
    override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {
        //点击跳转
        navigationController?.pushViewController(JCTempViewController(), animated: true)
    }
    
    

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
